<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<LCA.Community.DAL.Model.Group>" %>
<%@ Import Namespace="LCA.Community.DAL.Model" %>
<%@ Import Namespace="LCA.Community.Web.Controllers" %>
<%@ Import Namespace="LCA.Community.Web.Helpers" %>
<%@ Import Namespace="Microsoft.Web.Mvc" %>

<asp:Content ID="Content2" ContentPlaceHolderID="HeaderContent" runat="server">
    <script src="<%= Url.Content("~/Scripts/MicrosoftAjax.js") %>" type="text/javascript"></script>
    <script src="<%= Url.Content("~/Scripts/MicrosoftMvcAjax.js") %>" type="text/javascript"></script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<div class="content-main">
    <h2><img src="<%= Url.Content("~/Content/images/FinalDesign/Icons/users24.png") %>" />Crear grupo</h2>
    <p>
        Rellene el siguiente formulario para crear el grupo
    </p>

    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm("Create", "Group", FormMethod.Post, new { enctype = "multipart/form-data" })){%>
	        <table cellspacing="10">
	            <tr>
	                <td><%= Html.LabelFor(m => m.Owner) %></td>
	                <td>
	                    <label><%= ((User)ViewData["user"]).RowKey %></label>
	                </td>
	            </tr>
	            <tr>
	                <td><%= Html.LabelFor(m => m.Name) %></td>
	                <td>
	                    <%= Html.TextBoxFor(m => m.Name, new { size = "50" }) %>
	                    <%= Html.ValidationMessageFor(m => m.Name)%>
	                </td>
	            </tr>
	            <tr>
	                <td><%= Html.LabelFor(m => m.Alias) %></td>
	                <td>
	                    <%= Html.TextBoxFor(m => m.Alias, new { size = "50" }) %>
	                    <%= Html.ValidationMessageFor(m => m.Alias)%>    
	                </td>
	            </tr>
	            <tr>
	                <td><%= Html.LabelFor(m => m.Description) %></td>
	                <td>
	                    <%= Html.TextAreaFor(m => m.Description, new { style = "width:400px;height:200px" })%>
	                    <%= Html.ValidationMessageFor(m => m.Description)%>    
	                </td>
	            </tr>
	            <tr>
	                <td><%= Html.LabelFor(m => m.Website) %></td>
	                <td>
	                    <%= Html.TextBoxFor(m => m.Website,new { size = "50" }) %>
	                    <%= Html.ValidationMessageFor(m => m.Website)%>
	                </td>
	            </tr>
	            <tr>
	                <td><%= Html.LabelFor(m => m.Site) %></td>
	                <td>
	                    <%= Html.TextBoxFor(m => m.Site,new { size = "50" }) %><br />
	                    <%= Html.ValidationMessageFor(m => m.Site)%>  
	                </td>
	            </tr>
                <tr>
                    <td><%= Html.LabelFor(m => m.Avatar) %></td>
                    <td>
                        <input name="avatarFile" id="avatarFile" type="file" />
                        <%= Html.ValidationMessageFor(m => m.Avatar)%>                                                                                   
                    </td>
                </tr>	            
	        </table>    
	         <%= Html.SubmitButton("SubmitForm","Crear grupo") %>
	    <br />
	    <br />
  <%} %>
</div>   

<div class="content-right">
    <% Html.RenderPartial("UserMenu",(User)ViewData["user"]); %>
</div> 
</asp:Content>
